package com.heima.tuozhan.day01.Car;

public class Car {
    private int luntai;
    private String color;
    private double weight;
    private int speed;

    public Car() {
    }

    public Car(int luntai, String color, double weight, int speed) {
        this.luntai = luntai;
        this.color = color;
        this.weight = weight;
        this.speed = speed;
    }

    public int getLuntai() {
        return luntai;
    }

    public void setLuntai(int luntai) {
        this.luntai = luntai;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    void jiasu(){
        setSpeed(getSpeed()+1);
    }
    void jiansu(){
        setSpeed(getSpeed()-1);
    }
}
